<?php
defined ( 'IN_SYS' ) or die ( 'Restricted Access' );
error_reporting(-1);
ini_set('display_errors','On');
define('IS_MAGIC_QUOTES', function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc());

//define('DS', DIRECTORY_SEPARATOR);
define('DS', '/');
define('SYS_ROOT',	realpath(dirname(__FILE__)).DS);
define('SYS_URL',	'./');	// http://localhost/webproj/
define('SYS_URL_SCRIPT',	$_SERVER['SCRIPT_NAME']);	// /webproj/index.php

define('SYS_LIB', SYS_ROOT.'lib'.DS);
define('SYS_LIB_KERNEL', SYS_LIB.'kernel'.DS);
define('SYS_MODEL', SYS_LIB.'model'.DS);

define('SYS_APPS', SYS_ROOT.'apps'.DS);
define('SYS_APPS_INIT', SYS_APPS.'init'.DS);
define('SYS_APPS_MODULES', SYS_APPS.'modules'.DS);
define('SYS_APPS_VIEWER', SYS_APPS.'viewer'.DS);

define('SYS_WEBSKINS', SYS_URL.'webskins'.DS);
define('SYS_SKINS', SYS_URL.'webskins'.DS.'skins'.DS);
define('SYS_PLUGINS', SYS_URL.'webskins'.DS.'plugins'.DS);

define('SYS_CONFIG', SYS_ROOT.'config'.DS);
define('SYS_LOG', SYS_ROOT.'log'.DS);
define('SYS_CACHE', SYS_ROOT.'cache'.DS);

define('SYS_SLEEP', 0);		// Delays the program execution for the given number of seconds. 
define('SYS_LANG_DEFAULT','default');	// languages
define('SYS_CHARSET','UTF-8');	// UTF-8 | Shift-JIS
define('SYS_IS_CLOUD', FALSE);
define('SYS_SESSION_NAME', '__ss__');

/**
 * STATIC_FILE_INCLUDE_CONTENT:
 * 	true: include content js/css in HTML
 * 	false: include link js/css in HTML
 */
define('STATIC_IS_INCLUDE', false);
define('STATIC_COMPRESS_CSS', true);	// compress css to content min
define('STATIC_COMPRESS_JS', true);		// compress js to content min
define('STATIC_COMPRESS_TPL', false);	// compress html to content min

// EXCEPTION ERROR
define('EXCEPTION_SUCC_OK', '200');
define('EXCEPTION_SUCC_FINISH', '211');
define('EXCEPTION_ERROR_SQL', '500');
define('EXCEPTION_ERROR', '400');
define('EXCEPTION_ERROR_NET', '500');

// y:year, m:month, d:day, w:week, h:hour
// WRITE LOG SQL
define('LOG_SQL', TRUE);
define('LOG_SQL_TYPE', 'VIEW,DEL,ADD,EDIT,OTHER');	// full: VIEW,DEL,ADD,EDIT,OTHER
define('LOG_SQL_TIME', 'w');	// y=Y, m=Y-m, d=Y-m-d, w=Y_W, h=Y-m-d_H
define('LOG_SQL_SLOW', 1);	// System will write log if sql-query run slow (seconds) | LOG_SQL_SLOW=0: not write log

// WRITE LOG ERROR ON SYS
define('LOG_ERROR', TRUE);
define('LOG_ERROR_TIME', 'w');	// y=Y, m=Y-m, d=Y-m-d, w=Y_W, h=Y-m-d_H
